CPM80A

CP/M Plus for SCPUA

User’s Manual

Contents

Section

  1. Introduction
  2. Starting up CP/M Plus
  3. Backing up Distribution Disks
  4. CP/M Plus Utilities for the SCPUA
  5. The CP/M BIOS
  6. Using the SVC

© Arcom Control Systems Ltd. 1987


Revision History

Manual BIOS* Comments
v1 iss 6 v1 iss 5 1987-02-19 first published in this format

* The CP/M Plus Operating system is version 3.0 from Digital Research. The BIOS is the machine dependent section tailored to the SCPUA and maintained by Arcom.


1. Introduction

CP/M Plus is version 3.0 of this very popular operating system from Digital Research. CP/M Plus includes many enhancements over earlier versions without sacrificing the ability to run existing software. The main improvement over earlier versions is the addition of support for more than 64k bytes of memory. Although the Z80 processor can directly address a maximum of only 64 kbytes of memory, the SCPUA computer board allows the bottom 32 kbytes of its address space to be switched from one block of memory to another (bank switching) so that the computer can access up to a maximum of 256 kbytes of RAM and 32 kbytes of EPROM. CP/M Plus is able to use this extra memory for buffering disk accesses, allowing more efficient use of the disk. Application programs can still only access up to 64 kbytes of memory but the proportion of this space occupied by the operating system is much reduced (the resident portion of CP/M Plus occupies about 4 kbytes on the SCPUA). In addition to the disk buffering, CP/M Plus uses hash tables to speed the searching of disk directories.

CP/M Plus as supplied supports two 3.5- or 5.25-inch disk drives, two input serial channels, one parallel keyboard channel and two output serial channels, though not all of these channels need to be connected.

The display device can either be a serial terminal or an SVC text video board. The EPROM supplied with the SCPUA is for a serial terminal and the EPROM supplied with this software is a replacement to use with an SVC (see Section 6).

With CP/M Plus Arcom supply the relevant parts of the BIOS (Basic Input/Output System) in source code form so that the number and types of serial ports and disk drives may be changed by the user.

Digital Research provide comprehensive documentation on the operating system: the Users Guide gives details of all the commands, the Programmers Guide gives information on using operating system functions, and the System Guide provides the necessary information for reconfiguring the system. Most of the information that you need on CP/M Plus can be found in those manuals. Some details are necessarily hardware specific and those are described in this document. Section 5 is provided to give more technical details for those who need them to reconfigure their system.

CP/M Plus includes an online help facility. The command HELP will give you information on the commands available and their syntax. This provides a convenient reminder of the commands. The HELP file has been extended to include information on the extra programs that Arcom supply with CP/M Plus.


2. Starting up CP/M Plus

The SCPUA should be connected to a power supply, disk drives and a serial terminal as described in the SCPUA manual. If you wish to use an SVC video board for the display see Section 6.

The serial devices should be set up as follows.

Video Display Terminal

The terminal is connected via PL2, on the 'top right' of the board (looking at the component side with the 64-way bus connector on the left). Pin 1 is marked and the connector is numbered as for a 10-way ribbon cable. Signals come out from the SCPUA on pin 1, and are received by the SCPUA on pin 2. Pin 5 is the ground. There is no handshaking on the terminal input or output. The data format is 8-bit ASCII with the most significant bit masked, no parity and two stop bits. The baud rate of the VDT must be one of 50, 75, 110, 134 5, 150, 300, 600, 1200, 1800, 2400, 3600, 4800, 7200 or 9600 baud. Communication should be full-duplex, character mode. Any standard RS232 video display terminal (sometimes referred to as a visual display unit or VDU) should be able to cope with this.

Printer

Channel B of the SCC is intended for connecting to a printer. This channel is initialised to run at 1200 baud, 8-bit data, two stop bits and no parity. The auto-enable mode of the SCC is switched on. This mode causes the CTS (clear to send) input to act as an enable for the transmitter and the DCD (data carrier detect) input to act as an enable for the receiver.

Most printers use a handshake line to stop the computer sending out characters too fast. For these printers it is necessary to connect the output from the SCC (PL2 pin 10) to the input of the printer (usually pin 3 on the 25-way D-type connector, but check your printer manual), and CTS (PL2 pin 7) to the handshake output of the printer (often RTS, pin 4 on the 25-way D-type, but this does change from manufacturer to manufacturer, so check the manual). CTS must be high for data f low enabled. If you want to run the printer at some baud rate other than 1200 use the CP/M command DEVICE to change the baud rate (see the Digital Research CP/M User's Guide).

Some printers use XON-XOFF handshaking protocol. For these printers it is necessary to connect the output of the SCC (PL2 pin 10) to the input of the printer (D25 pin 3),and the input of the SCC (PL2 pin 9) to the output of the printer (D25 pin 2). The handshake lines must be tied to the enabled state, i.e. CTS (PL2 pin 7) must be tied to +12V and DCD (PL3 pin 14) must be tied to 0V (PL2, pin 5). The DCD input is NOT an RS232 input and should be tied to 0V to enable, because it is an inverted TTL input directly into the SCC.

CAUTION

DO NOT connect this input (DCD,PL3 PIN 14) to RS232 signal levels otherwise severe damage will be caused to the SCC.

Once the enables are connected, the DEVICE command should be used to set the baud rate and to enable XON-XOFF handshaking.

First the computer should be switched on and then the CP/M disk should be inserted into drive A. The computer will need to determine the baud rate of the link. Press the return key on the keyboard. A message like:

	Arcom SCPUA
	Serial console running at 9600 baud

	Insert system disk in drive A: and press RETURN

should appear. If this message does not appear, check the baud rate setting on the VDT (see paragraph on VDT above), reset the computer and try again.

Ensure that the disk is in drive A: and hit the return key. The computer should read the loader program from disk and execute it. If there is no system on the disk, the computer will print an error message. In this case simply choose the correct disk, and press the return key again.

WARNING

Switching the computer on or off with disks inserted in disk drives can corrupt the disks. Always insert disks after switching on and remove them before switching off.


3. Backing up Distribution Disks

After you have started up the system for the first time, you are advised to immediately make a backup copy of the master disk supplied by Arcom. This can most conveniently be done by placing the master disk in drive A: and a new disk in B: and then running the DISKFORM program followed by the DISKCOPY program (these programs are described in detail in Section 4).

Note that in all Arcom system commands incorporating the word "disk", it is spelled with a 'k' - not the European "disc".

Example backup sessions:

A. Using a two-drive system

Boot up the system as described above using the master system disk supplied by Arcom. Place a new disk in drive B: and format it using the program DISKFORM.

	DISKFORM B:

This will take a couple of minutes. CAUTION: Be sure the master disk stays in drive A and the new disk in drive B, otherwise the master disk will be erased. Now copy the contents of the distribution disk with the command DISKCOPY. D ISKCOPY A: B : This will take about two and a half minutes.

B. Using a one-drive system

Boot up the system as described above using the master system disk supplied by Arcom. To ensure that the master disk does not become corrupted it should now be write protected. On a 3.5-inch disk this is done by sliding the write protect tab so that the write protect hole in the corner of the disk is open. On a 5.25-inch disk place a paper label over the notch on the side edge of the disk.

After write-protecting the disk enter the command:

	DISKFORM A:

This program will prompt you to remove the master disk from drive A:, put a new disk in and then press return. The program will then format the new disk.

The master disk can then be copied onto the new disk using DISKCOPY.

	DISKCOPY A: A:

The DISKCOPY program will copy from the master disk to the new disk by prompting you to change the disk in drive A: as it requires. The master disk is the source disk and the new disk is the destination disk.


4. CP/M Plus Utilities for the SCPUA

Arcom supplies four programs in addition to those programs included with CP/M Plus. These programs are hardware dependent programs that are needed to make full use of the disks. The programs are COPY (to copy a file from one disk to another, possibly on the same drive), SYSCOPY (to initialise the system tracks of a floppy disk), DISKCOPY (to make a fast backup copy of one disk to another of the same type) and DISKFORM (to format a new floppy disk).

Section 4.5 describes the use of EPROM, the EPROM programming software which may be bought separately from Arcom (order code EPS-xx)

The HELP command has details on these extra programs. For example:

	HELP DISKFORM

will give information on the program that formats disks.

4.1 CΟΡΥ

This program copies a single file from one disk to another. Its main use is copying between two disks using only one drive. The CP/M Plus utility PIP should used for other copy operations. The COPY command has three forms:

	COPY src-filespec 
	COPY src-filespec dst-filespec
	COPY src-filespec d:

where src-filespec is the name of the source file, and the destination is specified as a filename (dst-filespec), a drive name (d:) or may be omitted. The source file is copied to the destination disk. If a destination filename is given, then that is used as the name of the destination file, otherwise if only a destination drive is specified, the filename is taken from the source filename. If the source and destination drives are the same, you will be prompted to change disks after the source has been read. If the file is too large to load into memory in one go, then the copying will be done in several stages and you will have to swap the disks at each stage.

Example:

	COPY A:CPM3.SYS

	CP/M Plus file copy program

	Source on A: then press RETURN

	Destination on A: then press RETURN

Error messages

Source filename must be unambiguous: the source filename cannot contain a * or a ?.

No source file on disk: the source file you specified could not be found.

Destination disk has changed: when copying a large file in several stages, the wrong destination disk was inserted into the drive.

No directory space left on destination disk: there is no room left in the directory for the destination file, you will have to delete a file to make room.

No space left on destination disk: there is insufficient room on the destination disk for the file being copied.

Close operation failed: when trying to close the output file, an error occurred. The most likely causes are the disk being changed, or a corrupted disk.

Disk I/O error: a physical error occurred while reading or writing to the disk. The wrong disk was inserted in the drive or the disk is corrupted.


4.2 SYSCOPY

This program is similar in operation to the COPYSYS program supplied by Digital Research. Its purpose is to copy onto the system tracks of a floppy disk the CPMLDR program used to start up CP/M Plus. SYSCOPY should be used in preference to COPYSYS because the latter only copes with one disk format, whereas the former will handle all the disk formats and types supported by Arcom for the SCPUA.

The program is run by either of the commands:

	SYSCOPY s: d:

	SYSCOPY filespec d:

where s: and d: represent the names of the source and destination drives respectively and filespec represents the name of a file (usually CPMLDR.COM).

The latter form causes the loader program to be read from a file, otherwise the loader program is read from the system tracks of the source drive. The loader program is then written to the system tracks of the destination drive. If the two drive names are the same, then you will be prompted to change the disks before the second disk is written. Before you can cold start a system from a disk, that disk must contain the files CPM3.SYS and CCP.COM. You may, therefore, need to copy these files across using COPY (see above) or PIP (see the Digital Research CP/M Plus Users Guide).

Example:

	SYSCOPY A: B:
	CP/M Plus system copy program
	Source on A: and destination on B: then press RETURN

Error messages

Destination drive name missing: 2 drive names OR 1 filename and 1 drive name must be specified on the command line; to copy from one disk to another using only one drive specify the drive name twice (e.g. SYSCOPY A: A:).

Invalid drive name: the specified drive does not exist or is not a valid drive (legal drive names are A-P, most systems only have 2 drives: A and B).

No source file on disk: the specified file could not be found.

Drive is not a floppy-disk drive: the specified drive is a hard disk or some drive type not supported by Arcom.

Disk I/O error: a disk I/O error occurred while reading or writing the disk. The disk may not have been inserted into the disk drive or the disk has been corrupted.


4.3 DISKCOPY

This program copies the entire contents of one disk to another of the same type and format. It is much faster than using PIP except when the disk contains only a few files, and in addition the system tracks are copied. This program would normally be used for making backup copies of disks. The program is run by the command:

	DISKCOPY s: d:

where s: and d: represent the names of the source and destination drives respectively (the colons after the names are optional). The two drives may be the same, in which case you will be prompted to insert and remove the 2 disks as necessary.

The program works by reading a block of several tracks from the source disk and then writing them to the destination disk. The two numbers that the program updates are the track numbers that it has reached on the source and destination disks respectively. Note that the track numbering starts at 0 and ends at 159.

Example:

	DISKCOPY A: B :
	Source on A: and destination on B: then press RETURN
	Track 159 159

Error messages

Source drive name missing: Destination drive name missing: 2 drive names must be specified on the command line; to copy from disk to another using only one drive specify the drive name twice (e.g. DISKCOPY A: A:).

Invalid drive name: the specified drive does not exist or is not a valid drive (legal drive names are A-P, most systems only have 2 drives: A and B).

Drive is not a floppy-disk drive: the specified drive is a hard disk or some drive type not supported by Arcom.

Disk I/O error: a disk I/O error occurred while reading or writing the disk. The disk may not have been inserted into the disk drive or the disk has been corrupted.


4.4 DISKFORM

This formats one or more floppy disks. The existing contents of the disk will be overwritten. Normally a brand new disk will need formatting before use, but otherwise it should rarely be necessary to reformat disks. The program is invoked by the command:

	DISKFORM d:

where d represents the name of the drive.

The program will prompt you to insert the disk and will then format it. After each track is formatted it is checked and any errors are reported.

The number that the program updates is the track number that it is formatting. On double sided disks this value is half the actual track number. Note that the track numbering starts at 0.

Example:

	DISKFORM B:
	Format and verify floppy disk on drive B:
	Disk will be formatted double-density 512-byte sectors.
	Insert disk in drive B: and press RETURN when ready, or ^C to abort Formatting...
	Track 079
	160 tracks formatted successfully at the first attempt.

Error messages

No drive specified: no drive name was specified on the command line.

Drive does not exist or is not a floppy disk: the specified drive does not exist or is a hard disk or some floppy disk type not supported by Arcom.

Drive not ready: there is no disk in the specified drive.

Disk is write protected: the plastic tab on the 3.5-inch disk case is in the write protected position or a write-enable label has been put over the write-protect slot on a 5.25-inch disk. Blank disks are supplied in write-enabled State.

Sector is marked deleted:
Record not found:
CRC error: these are all errors that can occur when the program attempts to read a track to check that it has formatted correctly. A summary of the total number of errors is printed at the end of the program.

If you get errors on verifying a brand new disk then the most likely causes are as follows:

  1. The drive may be too close to a VDT, TV monitor, switch-mode power supply or other source of insufficiently shielded magnetic or electromagnetic interference.

  2. The drive heads may be dirty. This is more common with 5.25-inch disks than 3.5-inch. The solution is to use a disk drive cleaning kit.

  3. The disk controller chip on the Arcom SCPUA board is out of adjustment. The presets associated with this device are factory set by Arcom for optimum performance on all drive types supported by Arcom. If they are subsequently changed, I/O errors, especially on double-density disks, may occur. Refer to the SCPUA manual for information on setting these adjustments.


4.5 EPROM

This EPROM programming software can be bought from Arcom, order code EPS-xx. It is provided for use with an SEP EPROM programmer board. If you run this program without this board plugged into your system CP/M Plus will crash and you will have to reboot.

The SCPUA board and the SEP board must be plugged into an STEbus backplane. Consult the current Arcom catalogue for information on STEbus backplanes.

This software is capable of programming EPROM types 2716, 2732, 2764, 27128 and 27256 at a range of voltages using the normal programming algorithm or the fast algorithm recommended by some manufacturers. The operations available are;

	Program an EPROM from a disk file
	Read an EPROM into a disk file
	Check that an EPROM is erased
	Copy data from one EPROM to another.

To run the program type the command:

	EPROM

The programmer is menu driven: at each stage the EPROM programmer will give you a list of options or tell you what information it requires next. If you are given a list of options each option is followed on the same line by a number.

Typing a number indicates your choice.

The first menu selects the size of EPROM you wish to use. The size may be reselected from the main menu. The second menu is the main menu from which all operations are initiated.

Before a program, read or check command is given an EPROM must be in the ZIF (zero insertion force) socket connected to the SEP board. When the programmer is not performing one of these operations, EPROMs may be plugged in and out. The LED near the socket is illuminated when the EPROM should not be removed.

There is a lever at the top of the ZIF socket. Before inserting an EPROM ensure that the lever is pointing towards you, so that the socket is open. Place the EPROM in the socket, with the notch at the end of the EPROM at the top and hold it there while you push the lever to your right until the lever has moved through 90 degrees. The EPROM should now be he to firm ty, flush against the socket.

EPROMs come in different sizes depending on the memory capacity. If your EPROM has less pins than the ZIF socket can accomodate the EPROM should be placed in the lower holes as far away from the lever as possible.

Manufacturers' data sheets give the voltage at which an EPROM should be programmed and whether the fast algorithm may be used or not.

The software includes several options for speeding up duplication of EPROMs. After a read or program operation the software stores the memory and EPROM addresses used and if any further programming is done the program will ask whether the same data is to be used again.

This feature can be used to duplicate EPROMs by reading an EPROM, optionally selecting a different size and then programming another EPROM.

To load a program into an EPROM the program would normally be converted into a binary executable file, for example by assembling and linking the program.

Selecting the option for programming an EPROM on the main menu will cause the software to ask you for the filename of the binary file. The EPROM software will then load the file into memory giving a message like:

	Program loaded into memory from 0100H to 0BFFH.

The programmer will then prompt you for the memory start and end addresses of your program. Normally you would wish to load the whole program into the EPROM. To do this quote the addresses given to you by the software as the place where the software will find your program. For example:

	Memory start address	: 100
	Memory end address	: BFF

The addresses must be given in hexadecimal without a trailing 'H'.

The programmer will then prompt you for the start address at which you wish your program to be loaded into the EPROM. Assembler programs are usually loaded starting at 0. BASIC programs must be loaded at 20H.

After programming an EPROM the software will report an error if any locations have not programmed correctly.

When reading, all or part of the EPROM can be read into memory and then optionally written to a disk file.


5. The CP/M BIOS

The hardware dependent part of CP/M Plus is the BIOS (Basic Input/Output System). With CP/M Plus Arcom also supply in Microsoft relocatable object code format (suffixed .REL) all the routines that make up both a banked and a non-banked BIOS so that you may build a new system configuration using LINK and GENCPM.

5.1 Generating a new system

Never run GENCPM on your distribution disk. Take a copy as described in Section 3 and use that as the development disk.

A banked system requires an extra 48 kbytes of memory. It can use more but the benefits of more memory are limited. The advantages of a banked system are:

	More memory (about 60 kbytes total) is available for users' programs.
	CCP.COM is stored in memory instead of on disk.
	Extra command line editing keys are available.
	Extra disk buffering.

Several submit files are supplied on the distribution disk to generate standard systems so that users can create some commonly required configurations such as banked CP/M and CP/M with real time clock.

The files are of the form

	GEN??.SUB

These files are normal text files and can be examined using the TYPE command. They contain comments at the beginning which indicate what system they generate. When run, for example using

	SUBMIT GEN01

each will link a BIOS, copy a data file to GENCPM.DAT and run the GENCPM program to produce a bootable disk. The files run GENCPM in AUTO DISPLAY mode (see Digital Research manuals) so GENCPM runs automatically.

Only experienced programmers should attempt to reconfigure the BIOS. The information given here and in the Digital Research System Guide is considered sufficient and no further support will be given.

The system configuration can be changed in the following ways:

	adding extra serial ports,
	adding extra disk drives,
	adding a RAM disk (using RDSKA-xx available from Arcom)
	adding a 20 Mbyte hard disk (using WINCH80-xx from Arcom)

The Digital Research System Guide (Book 3 in the "CP/M Plus Operating System” binder) is an essential reference when changing the BIOS.

5.1.1 Building a new system

If you wish to add a serial driver or disk drive or modify the BIOS in any way perform the following steps to produce a new bootable disk.

	Backup distribution disk onto new disk
	Modify source code on new disk
	Assemble all altered files
	Link BIOS together to produce either BIOS3.SPR or BNKBIOS3.SPR
	Run GENCPM

An example of the operation of GENCPM is given in Section 5.1.3 of this manual and Section 5.1 of the System Guide. The GENCPM.DAT file has been set up for defaults that work with the hardware.

Arcom supply the following files to allow you to add to, or reconfigure, the BIOS.

BIOS3.SPR	the BIOS for a non-banked system. 
BNKBIOS3.SPR	the BIOS for a banked system. 
BIOSN.REL	the invariant part of the BIOS for a non-banked system.
BIOSB.REL	the invariant part of the BIOS for a banked system.
BIOSKRNL.ASM	the source for BIOSN.REL and BIOSB.REL
		supplied by Digital Research.
SCB.REL		the CP/M Plus system control block.
SCB.ASM		the source code for SCB.REL.
BOOTN.REL	the object file for the initialisation and 
		warm boot routines for a non-banked system.
BOOTB.REL	the object file for the initialisation and
		warm boot routines for a banked system.
BOOT.ASM	the source code for BOOTB.REL and BOOTN.REL.
MEMORY.REL	the object file for the block move and bank switch routines.
TIME.REL	the object file for a real time clock routine.
		In the version supplied, this routine just consists of 
		a RET instruction.
		If you add a real-time clock to the system then you will need to
		replace this routine with the code to support that clock.
TIME.ASM	the source code for TIME.REL.
TIMES.REL	the object file for date and time routines using the Arcom
		SCRAM board (see current catalogue). If you have one of
		these boards in your system use this in place of TIME.REL
		listed above.
TIMES.ASM	the source code for TIMES.REL 
CHARIO.REL	the object file for the character I/O routines.
CHARIO.ASM	the source code for CHARIO.REL.
DRVTBL.REL	the object file for the CP/M Plus drive table.
		This file specifies which CP/M Plus logical drive
		(A:, B: etc.) is assigned to which physical device.
		Adding disk drives involves adding the addresses of
		their disk parameter headers to the drive table.
DRVTBL.ASM	the source code for DRVTBL.REL
FDPH.REL	the object file for the disk parameter headers and
		disk parameter blocks for the floppy disk drives.
FDPH.ASM	the source code for FDPH.REL.
		This file can be modified to include additional disk formats in the system.
		The comments in this file should be read in
		conjunction with Section 3 of the System Guide.
FLOPPY.REL	the object file for the floppy disk routines.

To link the object files for a non-banked system use the command:

	LINK BIOS3[OS]=BIOSN,MEMORY,SCB,TIME,BOOTN,CHARIO,DRVTBL,FDPH,FLOPPY[NR]

This command should be all on one line. Note that the Digital Research System Guide gives this command incorrectly.

To link the object files for a banked system use:

	LINK BNKBIOS3[B]=BIOSB,MEMORY,SCB,TIME,BOOTB,CHARIO,DRVTBL,FDPH,FLOPPY[NR]

5.1.2 GENCPM

Sub-sections 5.1.3 to 5.1.5 go through the options in the GENCPM command, giving an explanation with respect to Arcom's implementation of CP/M Plus.

The program GENCPM creates an operating system from the object files for the BIOS and BDOS. GENCPM is able to control many system parameters such as the number of banks and the at location of disk buffers within those banks. Another example of the operation of GENCPM is given in the System Guide.

Read Section 5.1 of the Digital Research System Guide carefully before proceeding.

Before a new system can be configured it is necessary to know how the memory of the SCPUA is organised when running CP/M Plus. Common memory starts at page 080H. The top page of RAM available to the system is 0FBH because the top 1K is used as workspace. On a banked system bank 2 starts at page 0DH (the CCP is stored below this). For a banked memory at least 48K is expected at STEbus address 20000H upwards.

Output from the GENCPM program is given in bold. User response is in italics. All questions have a default answer in brackets before the question mark. If there is no entry after a question then just press RETURN to use the default value. Note that all entries are in HEX unless preceeded by a '#'.

Answer NO to directory hashing, which sometimes does not work due to a bug in GENCPM.

5.1.3 All systems

The following options apply to banked and non-banked system generation.

	CP/M 3.0 System Generation
	Copyright (C) 1982, Digital Research
	Default entries are shown in (parens).
	Default base is Hex, precede entry with # for decimal

	Use GENCPM - DAT for defaults (Y) ?		YES
	Create a new GENCPM - DAT file (N) ?		Usually YES if you are
							going to change anything
	Display Load Map at Cold Boot (N) ?		Personal choice

	Number of console columns (#80) ?		Set up for your
	Number of lines in console page (#24) ?		terminal
	Backspace echoes erased character (N) ?		NO
	Rubout echoes erased character (N) ?		NO
	Initial default drive (A: ) ?			Usually A:

	Top page of memory (FB) ?			FB for CPM80A-XX
							F3 for CPM80 VAB
							   and CPM80 VAA

The next question is whether to generate a banked or non-banked system. GENCPM asks different questions depending on the answer. Section 5.1.4 gives the rest of GENCPM for a non-banked system, and Section 5.1.5 is for a banked system.

5.1.4 Non-banked system

Bank switched memory (Y) ?			NO

Double allocation vectors (Y) ?			YES

Accept new system definition (Y) ?		YES (Or NO to return to
						start of GENCPM)

Setting up Allocation vector for drive A:
Setting up Checksum vector for drive A:
Setting up Allocation vector for drive B:
Setting up Checksum vector for drive B:
Setting up Allocation vector for drive C:
Setting up Checksum vector for drive C:

Setting up directory hash tables:
Enable hashing for drive A: (N) ?		Always NO
Enable hashing for drive B: (N) ?		
Enable hashing for drive C: (N) ?

Setting up Blocking/Deblocking buffers:

The physical record size is 0200H:		512 bytes/sector
						Usual Arcom standard
	Available space in 256 byte pages:
	ΤΡΑ = 00D3Η

	*** Directory buffer required  ***
	*** and allocated for drive A: ***

	Available space in 256 byte pages:
	ΤΡΑ = 00D1Η

	*** Data buffer required and ***
	*** allocated for drive A:   ***

	Available space in 256 byte pages:
	TPA = 00CEH

		Overlay Directory buffer for drive B: (Y) ?
		Share buffer (s) with which drive (A:) ?

						Answer YES to overlay
						and share with A:
						for every drive.

	Available space in 256 byte pages:
	ΤΡΑ = 00CΕΗ

		Overlay Data buffer for drive B: (Y) ?
		Share buffer (s) with which drive (A:) ?

	The physical record size is 0080H:		128 bytes per sector
							IBM 3740 8-inch format

	Available space in 256 byte pages:
	TPA = 00CEH

		Overlay Directory buffer for drive C: (Y) ?
		Share buffer(s) with which drive (A:) ?

	Available space in 256 byte pages: ΤΡΑ = 000ΕΗ

	Accept new buffer definitions (Y) ?

BIOS3	SPR	EE00H	0A00H
BDOS3	SPR	CF00H	1F00H

*** CP/M 3.0 SYSTEM GENERATION DONE ***

The system produced above gives a 51K TPA

5.1.5 Banked system

Bank switched memory (Y) ? 			YES 
Common memory base page (80) ?			Always 80 for SCPUA

Long error messages (Y) ?			YES

Accept new system definition (Y) ?		YES (Or NO to return 
						to start of GENCPM)

Setting up Allocation vector for drive A: 
Setting up Checksum vector for drive A: 
Setting up Allocation vector for drive B: 
Setting up Checksum vector for drive B: 
Setting up Allocation vector for drive C: 
Setting up Checksum vector for drive C:

The next section asks about the extra memory provided for CP/M Plus to use.

The common bank is the upper 32K of on-board RAM, and bank 0 is the lower 32K of on-board RAM, bank 1 is STEbus RAM from 20000h to 28000h, bank 2 is RAM from 28000h to 30000h, etc. Note that these are the bank boundaries, the banks may not be full of RAM in some cases (eg. a 48K RAM board can only fill one and a half 32K-banks). The common bank and banks 0, 1 and 2 must be present. Banks 3 to 6 are optional and the extra memory from them does not produce much increase in performance.

The usual configuration is to have a 48K memory board on the STEbus to give banks 0, 1 and 2 only. The following example illustrates the use of a 48K SCRAM memory card residing at STEbus locations 20000 - 20000 (128K to 176K), of which 32k is used for bank 1 and 16k for bank 2. Check that the jumpers on your SCRAM memory board are set to respond to these locations

In the memory segment table which must be entered three figures are required:

	the base of the bank
	the size of the bank
	the bank number

All figures concerning the size of memory are in pages, that is they are the real figure divided by 256. For example if you have RAM between 28000h and 2C000h then to declare bank 2 use:

	Base, size, bank (00,00,00) ?	0D,33,2

meaning "The block of RAM in bank 2 starting at address 0D00 and containing 3300 bytes can be used by CP/M for disk buffering."

Bank 2 must have a base page value of 0D. Banks 1 and common must not be declared in the memory segment table. Memory used for other things such as a RAMdisk should not be declared in the segment table. The sample values given below assume that only banks 0, 1, 2 and common are to be used.

*** Bank 1 and Common are not included ***
*** in the memory segment table.       ***

Number of memory segments (#2) ?		Excluding banks 1 and
						common there are only
						two banks (0 and 2)

CP/M 3 Base, size, bank (4D,33,00)		This message says that
						the CP/M system itself
						uses 33h pages of RAM
						from bank 0 starting
						from page 4Dh. Therefore
						when entering the memory
						segment table memory
						from 4D00h in bank 0
						must not be used.
Enter memory segment table:
Base, size, bank (0D,48,00) ? 00,4D,02		Bank 0 is 4D pages from
						page 00 upwards, that is
						memory from 0000h to
						04CFFh, avoiding memory
						used by CP/M as
						described above.

Base, size, bank (0D,73,02) ? 0D,33,02		Bank 2 is 33 pages from
						page 0D upwards, that is
						memory from 0D00h to
						03CFFh within bank 2.

		Start  size			Summary of bank usage
CP/M 3 Sys	4D00H 3300H Bank 00		33h pages used by CP/M 
Memseg No. 00	0000H 4D00H Bank 00		4Dh pages for buffering 
Memseg No. 02	0D00H 3300H Bank 02		33h pages for buffering

Accept new memory segment table entries (Y) ?	YES (Or NO to return to
						start of Bank section)

Setting up directory hash tables:
 Enable hashing for drive A: (N) ?		No for floppies
 Enable hashing for drive B: (N) ?		YES for Winchesters
 Enable hashing for drive C: (N) ?

Once the amount of extra RAM has been declared, it is allocated as disk directory and data buffering. All directory buffering is allocated in bank 0. If no buffering space is provided for a disk then GENCPM asks which disk to share buffer space with.

Always allocate data buffers outside of common (when asked). If you don't then they will be allocated from the TPA which will be reduced. After each allocation GENCPM gives the amount of space left in the TPA, bank 0 and other banks. Note that figures for the amount of free space left are in pages (256 bytes) but the amount of buffering space must be given in numbers of physical sectors. Disks are allocated in order of sector size, biggest first.

If you have a Winchester in your system a suitable scheme is to allocate 8 directory and 8 data buffers for drive A: and divide all the rest of the space between directory and data buffers for the Winchester. Make all other drives share with A:.

If you do not have a Winchester in your system apply the scheme above but divide the rest of the space between directory and data buffers on drive B:.

There is a bug in GENCPM. If the amount of free memory in bank 0 goes down to 0000h and then suddenly becomes 00FFh when some data buffering is allocated then you must start the disk buffering section again reducing the amount of memory you allocate from bank 0 so that there are one or two pages free when you arrive at the same point.

GENCPM does not notice all errors in disk buffering. Sharing buffering with a drive that does not have any buffering space is an error. Do not allocate more than 0FFh pages at once as this may cause GENCPM to allocate space wrongly.

A method of allocation which is guaranteed to work (unless GENCPM gives an error message) is to allocate 8 directory buffers and 8 data buffers for the first drive and 0 directory and 0 data buffers for all other drives, making them share with the first drive. Once this is working you can start to experiment.

Setting up Blocking/Deblocking buffers:
The physical record size is 0200H:
	Available space in 256 byte pages:
	TPA = 00EFH, Bank 0 = 004DH, Other banks = 0035H
		Number of directory buffers for drive A: (#1) ? #8
	Available space in 256 byte pages:
	TPA = 00EFH, Bank 0 = 003CH, Other banks = 0033H
		Number of data buffers for drive A: (#8) ? #8
		Allocate buffers outside of Common (Y) ?
	Available space in 256 byte pages:
	TPA = 00EFH, Bank 0 = 003CH, Other banks = 0023H
		Number of directory buffers for drive B: (#0) ? 8
		Allocate buffer(s) outside of common (Y) ?
	Available space in 256 byte pages:
	TPA = 00EFH, Bank 0 = 002BH, Other banks = 0023H
		Number of data buffers for drive B: (#0) ? #37
		Allocate buffer(s) outside of common (Y) ?
The physical record size is 0030H:
	Available space in 256 byte pages:
	TPA = 00EFH, Bank 0 = 0001H, Other banks = 0001 H
		Number of directory buffers for drive C: (#0) ? 
		Share buffer(s) with which drive (A:) ?
	Available space in 256 byte pages:
	TPA = 00EFH, Bank 0 = 0001H, Other banks = 0001H

Accept new buffer definitions (Y) ?

BNKBI0S3 SPR F500H 0700H
BNKBI0S3 SPR 7A00H 0600H
RESBD0S3 SPR EF00H 0600H
BNKBDOS3 SPR 4000H 2E00H

*** CP/M 3.0 SYSTEM GENERATION DONE ***

The system generated above will provide a 59K TPA.

5.2 Disk formats

The system supplied by Arcom is configured for two 3.5- or 5.25-inch drives (in any combination) (A; and B:) and an 8-inch drive (C:), all with 3ms step rate. An SDEB (disk expansion board) is needed to connect an 8-inch drive to the SCPUA.

The disk drive formats are specified by tables in BIOS files FDPH.ASM and DRVTBL.ASM.

The 3.5-inch and 5.25-inch drives are 80-track double-sided running in double-density mode. Suitable drives can be purchased from Arcom (Consult the STE System Data Sheet and current Arcom catalogue). The disks are formatted with nine 512-byte sectors per track. The first side of track 0 is reserved for the loader program. The CP/M Plus data block allocation size is 4096 bytes. These drives give a formatted capacity of 720 kbytes per disk. The CP/M Plus disk parameter block is generated by the following invocation of the DPB macro (see Section 3.3.5 of the CP/M Plus System Guide):

	DPB5DS : DPB 512,9,160,4096,128, 1

No sector translation is performed and the sectors are numbered from 1 to 9 inclusive. The disk is formatted with the sectors interleaved (the sectors are in the order 1,6,2,7,5,8,4,9,5) to speed multiple sector transfers, though this ordering is transparent to the disk controller.

3.5-inch and 5.25-inch disks are logically identical. Where ever source files refer to one size of disk the same is applicable to the other. Thus DPB5DS in FDPH.ASM can also be used for 3.5-inch disks.

Drive C: is configured for a single-sided single-density IBM 3740 format disk (the CP/M standard) for a drive with 3ms step rate. There are 26 sectors of 128 bytes per track, numbered from 1 to 26, and 77 tracks per disk. The first two tracks are reserved for the loader program. The CP/M data block allocation size is 1024-bytes. The CP/M disk parameter block is generated by the following invocation of the DPB macro:

	DPB8SS : DPB 128,26,77,1024,64,2

The skew factor is 6 and is invoked by the macro call

	SKEW 26, 6,0

The source code of the file FDPH.ASM is supplied with your BIOS so that it may be modified to change the disk formats or to include additional disk drive types not supported by Arcom.

5.3 BDOS and BIOS routines

Although the BIOS routines are written in Z80 machine code, they make no use of the index registers or the alternate register set. Any future enhancements of the BIOS will also not use these registers. Since BDOS is written in 8080 machine code, it does not use these registers either. Hence these registers will not be changed by operating system calls.

Both the banked and the non-banked versions of the Arcom BIOS implement BIOS functions 27, 29 and 30.

BIOS Function 27

This selects the bank to be used for subsequent code execution. This routine is only intended for use by BDOS and BIOS routines and should not be called by user programs. The stack and the calling routine must reside in common memory (i.e. above 8000H) and BDOS routines cannot be called from any bank except the bank containing the TPA. The latch settings as set by BIOS function 27 corresponding to the CP/M Plus bank numbers are listed below.

Logical
Bank number
Physical
Bank number
(Port 0 bits 0-2)
Comments
01On-board RAM (bottom 32K)
1420000-27FFF of STEbus memory
2528000-2FFFF " " "
3630000-37FFF " " "
4738000-3FFFF " " "
5210000-17FFF " " "
61Do not use
70On-board EPROM

BIOS Function 29

id="Section 5.3.2"

This is the inter-bank move function and allows a block of up to 128 bytes to be moved from one bank to another. It has been implemented to allow multiple banks to be added to the system for disk buffering.

BIOS Function 30

This is an additional BIOS function which has been implemented to allow convenient access to the write-only latch at I/O address 0. The value held by this latch is stored by the BIOS so that it may be modified (e.g. changing the disk select bits without changing the bank select). If you modify any of the bank select bits you must ensure that they are restored to the value corresponding to the TPA bank before any BDOS calls are made. This BIOS function is always resident (so that it can be called without switching banks, e.g. by direct vectoring into the BIOS jump table). It returns in HL the address of a byte in the resident part of the BIOS which stores a copy of the value loaded into the latch at I/O address 0 (see the hardware manual for details of the function of this latch).

This function also returns value 1 in A, thus allowing programs to distinguish which Arcom processor the program is running on. (the Arcom Processor B BIOS function returns 2 in register A.

CP/M Plus 3 BDOS function 50

BDOS function 50 has been provided by Digital Research to allow direct calls to BIOS routines even though they may reside in a different bank from the user program. However, values returned by the BIOS routines in any registers other than A may be changed. This function would not normally be needed for accessing any BIOS routines other than the character I/O routines for which any values are returned in register A. BDOS function 50 also intercepts BIOS function calls 27 and 29 to prevent user programs from accessing operating system memory banks.

5.4 The EPROM I/O routines

The low-level character I/O routines are contained in the SCPUA board boot EPROM, so that the bootstrap program and disk operating system are independent of the exact hardware configuration. All the routines are accessed through a jump table at location 80H in the EPROM. The structure of this jump table is as follows:

;
; Jump table
; 0080H
;
; character I/O routines
;
JPCIT0:	JP	CIT0			; initialise
ЈРСIS0:	JP	CIS0			; input status
ЈРСI0:	JP	CI0			; input
ЈРСОS0:	JP	COS0			; output status
JPCO0:	JP	CO0			; output

The jumps for the character I/O routines point at additional jump tables, allowing support for a total of 16 character I/O devices. These jump tables look like:

CIT0:	JP	CINI0			; initialise device 0
	JP	CINI1			; initialise device 1
	JP	CINI2			; initialise device 2
	etc.

CIS0:	JP	CIST0			; input status device 0
	JP	CIST1			; input status device 1
	JP	CIST2			; input status device 2
	etc.

CI0:	JP	CIN0			; input from device 0
	JP	CIN1			; input from device 1
	JP	CIN2			; input from device 2
	etc.
COS0:
	JP	COST0			; output status device 0
	JP	COST1			; output status device 1
	JP	COST2			; output status device 2
	etc.

CO0:	JP	COUT0			; output to device 0
	JP	COUT1			; output to device 1
	JP	COՍT2			; output to device 2
	etc.

5.4.1 Character I/O routines

The character I/O routines allow access to the on-board SCC and the on-board parallel input port (designated the keyboard port, though its use is much more general). Device 0 is SCC channel A, device 1 is SCC channel B and input device 2 is the keyboard port. The keyboard port expects a short negative going strobe when the data are available. The data are latched on the rising edge of this strobe.

CINI0 through CINI15: the jump table starting address is stored at 81H.

Initialise a character device. This is called with A = baud rate (0 implies no change, 1 through 15 correspond to 50 through 19200 baud as used by CP/M Plus). Please note that 19200 baud is not supported for the SCPUA on-board SCC. No registers other than A are changed.

CIST0 through CIST15: the jump table starting address is stored at 84H.

Input status of a character device. This returns A = 0 if no character is available, or A = FFH if a character is available. No other registers are changed.

CIN0 through CIN15: the jump table starting address is stored at 87H.

Input a character. This returns in A the next available character from this device. The character is an 8-bit value, except for device 0, for which the character is assumed to be ASCII and only a 7-bit value is returned. No register other than A is changed.

COST0 through COST15: the jump table starting address is stored at 8AH.

Output status of a character device. This returns A = 0 if the transmitter is still busy, or A = FFH if the transmitter is ready to accept another character. No other register is changed.

COUT0 through COUT15: the jump table starting address is stored at 8DH.

Output a character. This outputs the 8-bit value in A. No register is changed.

5.4.2 Configuring for a parallel keyboard

The normal console device is device 0, a VDT.

CIST2 and CIN2 are Labels for routines to get the status and character from a parallel keyboard. Normal console I/O goes through CIST0 and CIN0. Thus by patching a copy of the EPROM supplied on the SCPUA board where CIST0 and CIN0 are stored in the jump table, so that the new values are CIST2 and CIN2, console input will be redirected to use a parallel keyboard connected to PL3. Note that CP/M Plus BIOS will still be configured for a serial input channel. This is not important but the DEVICE command will still display console input as serial.

An RS232 display will still be needed. The byte in the EPROM to disable the auto baud rate determination must be set to 0 and the baud rate of the console device must be set to the baud rate of the device 0 RS232 display.


5.5 The EPROM bootstrap

The EPROM contains a bootstrap program to load the CPMLDR from disk into the SCPUA on-board memory and execute it. The bootstrap program and CPMLDR need to know the characteristics of the disk in order to do this. All the relevant information is contained in a block of 32 bytes starting at address 40H. In addition the EPROM bootstrap has to initialise the console I/O system. For a serial console the EPROM routine will automatically determine the baud rate The sequence of operations is as follows:

  1. the SCC channel A is initialised at the baud rate specified by the value at location 40H (set to 9600 baud by Arcom), and the message "Press RETURN" is printed. If your terminal is not set to this baud rate then this message will not be legible.

  2. the user should press the return key and the computer will determine the baud rate. A message similar to:

    	Arcom SCPUA
    	Serial console running at x baud

    should now appear where x is the baud rate. If this message does not appear then the baud rate has not been correctly determined. In this case you will have to hit reset and restart the procedure. You should note that 19200 baud cannot be handled.

    It is possible to disable the autobaud feature by setting location 41H of the EPROM to 0. The console can then only be run at the baud rate specified at location 40H.

    EPROM addresses 03H through 3FH inclusive and 60H through 7FH inclusive are left free for user patches and additions, for example, extra serial devices.

The first 128 bytes of the EPROM are organised as follows:

; 0000H

	JP START			; reset entry point
; reserved space for interrupt/restart jumps
	DEFB	0FFH
	DEFW	0FFFFH,0FFFFH
	DEFW	0FFFFH,0FFFFH,0FFFFH,0FFFFH 
	DEFW	0FFFFH,0FFFFH,0FFFFH,0FFFFH 
	DEFW	0FFFFH,0FFFFH,0FFFFH,0FFFFH 
	DEFW	0FFFFH,0FFFFH,0FFFFH,0FFFFH 
	DEFW	0FFFFH,0FFFFH,0FFFFH,0FFFFH 
	DEFW	0FFFFH,0FFFFH,0FFFFH,0FFFFH 
	DEFW	0FFFFH,0FFFFH,0FFFFH,0FFFFH
; 
; Boot configuration data
; 0040H
; Set the default baud rate for the console. Allowed values are
; 1=50 baud, 2=75 baud, 3=110 baud, 4=134.5 baud, 5=150 baud,
; 6=300 baud, 7=600 baud, 8=1200 baud, 9=1800 baud, 10=2400 baud,
; 11=3600 baud, 12=4800 baud, 13=7200 baud, 14=9600 baud.
;
BDEF:	DEFB	14			; default is 9600
;
; Enable/disable baud rate sensing
; Set 0 to disable this facility, FFH to enable it.
;
AUTO:	DEFB	0FFH			; FF to enable autobaud
;
; disk drive data
;
; Type: bits 7,6,5 and 5 correspond to the bit settings
; to load into the latch at I/O address 0 to select the drive.
; Bit	7: 1=8", 0=5.25" or 3.5"
;	6: drive select 1, active low
;	5: drive select 0, active low
;	4: must be 1
;	3: 1-single density, 0=double density
;	2: must be 0
;	1: must be 0
;	0: must be 0
;
ΤΥΡΕ:	DEFΒ	050H			; disk control bits
;
; Set 0 for a single sided drive, 1 for a double sided drive
;
SIDES:	DEFB	1			; double sided
;
; Set to the step speed bits for FDC (279x) type I command
; 0 = 3ms
; 1 = 6ms
; 2 = 10ms
; 3 = 15ms
;
STEPS:	DEFB	0			; step speed bits
;
; Set to the number of tracks on the drive
; 5.25" = 80
; 3.5m = 80
;
NTRKS:	DEFB	80			; number of tracks
;
; CP/M Plus style disk parameter block for 3.5-inch drive.
; For this control block each side of a physical track counts
; as a separate logical track.
;
SECPT:	DEFW	36			; logical records / track
	DEFB	5,1FH			; block shift, mask
	DEFB	3			; extent mask	
	DEFW	177			; maximum block number 
	DEFW	127			; max directory entry
	DEFB	080H,000H		; directory block mask 
	DEFW	32			; directory check vector
SYSTRK:	DEFW	1			; number of system tracks
SECSIZ:	DEFB	2,3			; physical shift, mask
;
	DEFB	0FFH			; reserved for future use
	DEFB	0FFH			; reserved for future use
	DEFB	0FFH			; reserved for future use
	DEFB	0FFH			; reserved for future use
	DEFB	0FFH			; reserved for future use
	DEFB	0FFH			; reserved for future use
	DEFB	0FFH			; reserved for future use
	DEFB	0FFH			; reserved for future use
	DEFB	0FFH			; reserved for future use
;
; reserved for NMI jump and user patches
; 0060H
;
	DEFW	0FFFFH,0FFFFH,0FFFFH,0FFFFH 
	DEFW	0FFFFH,0FFFFH,0FFFFH,0FFFFH 
	DEFW	0FFFFH,0FFFFH,0FFFFH,0FFFFH 
	DEFW	0FFFFH,0FFFFH,0FFFFH,0FFFFH

6. Using the SVC

CPM80A can be used with an SVC video board. The EPROM supplied with the SCPUA board is for CP/M using a serial terminal. The EPROM supplied with CPM80A is a replacement EPROM that uses the SVC as its display device.

A serial keyboard is required when using an SVC.

6.1 Hardware Configuration

The SVC board must be jumpered to reside at STEbus I/O address 03A0H, which is standard, as described in the SVC manual. The SCPUA must be jumpered to provide the STEbus with SYSCLK (see the SCPUA hardware manual for details).

Connection of a monitor to the SVC is described in the SVC manual.